home *** CD-ROM | disk | FTP | other *** search
/ 15 Beaut Aussie Games 1 / BEAUTGAMESV1.iso / pc / Windows / data1.cab / Program_Files / dswmedia / games / canetoad.dcr / background_3_background parent.ls < prev    next >
Encoding:
Text File  |  2002-01-01  |  1013 b   |  43 lines

  1. property sNumber, hInit, vInit, hIncr, vIncr
  2.  
  3. on new me
  4.   global projector
  5.   sNumber = [3, 4, 5, 6]
  6.   hInit = [-200, -200, -200, -200]
  7.   vInit = [-157, 150, -157, 150]
  8.   if projector then
  9.     hInit = [-3, -3, 406, 406]
  10.     vInit = [-157, 150, -157, 150]
  11.     repeat with i = 1 to count(sNumber)
  12.       puppetSprite(getAt(sNumber, i), 1)
  13.     end repeat
  14.   end if
  15.   init(me)
  16.   return me
  17. end
  18.  
  19. on init me
  20.   global projector
  21.   hIncr = 0
  22.   vIncr = 15
  23.   if projector then
  24.     repeat with i = 1 to count(sNumber)
  25.       set the loc of sprite getAt(sNumber, i) to point(getAt(hInit, i), getAt(vInit, i))
  26.     end repeat
  27.   end if
  28. end
  29.  
  30. on move me
  31.   repeat with i = 1 to count(sNumber)
  32.     set the loc of sprite getAt(sNumber, i) to the loc of sprite getAt(sNumber, i) + point(hIncr, vIncr)
  33.   end repeat
  34.   if the locV of sprite getAt(sNumber, 1) >= 157 then
  35.     repeat with i = 1 to count(sNumber)
  36.       set the loc of sprite getAt(sNumber, i) to point(getAt(hInit, i), getAt(vInit, i))
  37.     end repeat
  38.   end if
  39. end
  40.  
  41. on die me
  42. end
  43.